package com.scoring.system.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.scoring.system.pojo.Achievement;

public interface AchievementMapper {
    int deleteByPrimaryKey(Integer id);
    
    int softDelete(Integer id);

    int insert(Achievement record);

    int insertSelective(Achievement record);

    Achievement selectByPrimaryKey(Integer id);
    
    Achievement selectByStudentAndCourse(@Param("studentId")Integer studentId,@Param("courseId")Integer courseId);
    
    List<Achievement> listAchievementByClassId(Integer classId);
    
    List<Achievement> listAchievementByStudentId(Integer studentId);
    
    List<Achievement> listAchievementByStudentIdAndTerm(@Param("studentId")Integer studentId,@Param("term")String term);
    
    List<Achievement> listAchievementByClassIdAndTerm(@Param("classId")Integer classId,@Param("term")String term);
    
    List<Achievement> listAchievementByClassIdAndTermAndCourseId(@Param("classId")Integer classId,@Param("term")String term,
    		@Param("courseId")Integer courseId);

    int updateByPrimaryKeySelective(Achievement record);

    int updateByPrimaryKey(Achievement record);
}